Part Number Hot Search : 
LT3682 74F2245 IZ1205S 2SD880 U3262A02 VC244A 1N5822U RM235730
Product Description
Full Text Search
 

To Download AF2GSDI-5ADXX Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  revision 3.7 atp industrial grade sd card specificati on atp industrial gra de sd c ard specification af512sdi - 5acxx af1gsdi - 5acxx af2gsdi - 5adxx af4gsdi - 5acxx af8gsdi - 5acxx revision 3.7 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 1 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on disclaimer: a tp electronics inc. shall not be liable for any errors or omissions that may appear in this do cument, and disclaims responsibility for any consequences resulting from the use of the information set forth herein. the information in this manual is subject to change without notice. atp general policy does not recommend the use of its products in lif e support applications where in a failure or malfunction of the product may directly threaten life or injury. all parts of the atp documentation are protected by copyright law and all rights are reserved. this documentation may not, in whole or in part, b e copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine - readable form without prior consent, in writing, from atp corporation. the information set forth in this document is considered to be ?proprietary? and ?confiden tial? property owned by atp. revision history date version changes compared to previous issue april 15 t h , 200 8 1.0 - base version august 13 th , 200 8 1.1 - add 8gb item sep. 19 th , 20 10 1.2 - combine sdhc product spec with sd product spec - update the product performance - add bend , torque , salt spray , solar radiation certification - add esd, water, dust proof certification - update mtbf mar . 4 th , 2011 2.0 - update p/n - update mtbf may. 24 th , 2011 2.1 - revise 8gb p/n - revise performance may. 31 st , 2011 2.2 - add density 16gb - update performance jul. 6 th , 2011 2.3 - revise p/n - update performance jul. 20 th , 2011 2.4 - revise jul . 27 th , 2011 3.0 - revise nov . 1 st , 2011 3.1 - add 4gb/8gb density - add atp sd life monitor tool nov. 17 th , 2011 3 .2 - update performance mar. 13 th , 2012 3.3 - add new features : staticdatarefresh and sd life monitoring tool - add tbw (total bytes written) information - add 1gb density and performance mar. 29 th , 2012 3.4 - add spi mode information in chapter 7 jun. 21 st , 2012 3.5 - separate specification by models - revise endurance information y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 2 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on aug. 6 th , 2012 3.6 - update af512sdi - 5acxx sep. 19 th , 2012 3.7 - product line up af512sdi - 5acxx, af1gsdi - 5acxx, af2gsdi - 5adxx, af4gsdi - 5acxx, af8gsdi - 5acxx - update data rete ntion information y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 3 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on table of contents 1 atp industrial grade sd /sdhc card overview ....................................................................... 6 1.1 atp product availability ........................................................................................................................6 1.2 main features ..........................................................................................................................................7 1.3 application ..............................................................................................................................................7 2 product specifications .................................................................................................................... 8 2.1 environment specifications ....................................................................................................................8 2.2 reliability ................................................................................................................................................9 2.3 data retention ...................................................................................................................................... 10 2.4 performance ......................................................................................................................................... 10 2.5 electrical characteristics ...................................................................................................................... 11 2.6 extra features ....................................................................................................................................... 11 2.7 global wear leveling - longer life expectancy ................................................................................. 12 2.8 staticdatarefresh technology ? ensure data integrity ....................................................................... 12 2.9 s d life monitoring tool ? lifespan check ......................................................................................... 13 2.10 physical dimension (units in mm) ..................................................................................................... 14 2.11 mechanical f orm f actor (units in mm) .............................................................................................. 14 3 electrical characteristics ............................................................................................................. 15 3.1 dc characteristics ................................................................................................................................ 15 3.2 ac characteristics ................................................................................................................................ 16 4 sd card hardware system .......................................................................................................... 20 4.1 sd card description ............................................................................................................................ 20 4.2 sd bus topology ............................................................................................................................... 21 4.3 sd card hardware interfa ce ................................................................................................................ 22 4.4 bus signal line load ........................................................................................................................... 23 4.5 hot insertion and removal ................................................................................................................... 24 4.6 power up .............................................................................................................................................. 24 4.7 compatibility to multi media card ...................................................................................................... 25 4.8 card capacity ....................................................................................................................................... 25 5 card registers ............................................................................................................................... 27 5.1 ocr register ....................................................................................................................................... 27 5.2 cid register ......................................................................................................................................... 27 5.3 csd register ........................................................................................................................................ 29 5.4 rca register ....................................................................................................................................... 34 5.5 scr register ........................................................................................................................................ 34 5.6 s s r register ........................................................................................................................................ 36 5.7 cs r register ........................................................................................................................................ 36 6 sd card functional description .................................................................................................. 37 6.1 sd bus protocol ................................................................................................................................. 37 6.2 command ............................................................................................................................................. 40 6.2.1 command types and format ........................................................................................................................... 40 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 4 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 6.2.2 command classes ............................................................................................................................................ 41 6.2.3 ? detailed command description .................................................................................................................... 43 6.3 card state transition table .................................................................................................................. 50 responses .......................................................................................................................................................... 53 6.4 sd card status ..................................................................................................................................... 56 6.4.1 card status ....................................................................................................................................................... 56 6.4.2 sd status ......................................................................................................................................................... 60 6.5 card identification mode and data transfer mode ............................................................................. 64 6.5.1 card identification mode ................................................................................................................................. 64 6.5.2 data transfer mode ......................................................................................................................................... 68 6.6 error handling ..................................................................................................................................... 70 6.6.1 e rror c orrection c ode (ecc) ........................................................................................................................... 70 6.6.2 cyclic redundancy check (crc) .................................................................................................................... 70 6.6.3 crc and illegal command .............................................................................................................................. 71 6.6.4 read, write and erase time - out ...................................................................................................................... 71 7 spi mode ........................................................................................................................................ 73 7.1 introduction .......................................................................................................................................... 73 7.2 spi bus topology ............................................................................................................................... 73 7.3 spi bus protocol .................................................................................................................................. 74 7.3.1 mode selection and initialization ..................................................................................................................... 75 7.3.2 bus transfer protection ................................................................................................................................... 77 7.3.3 data read ......................................................................................................................................................... 77 7.3.4 data write ........................................................................................................................................................ 78 7.3.5 erase & write protect management ................................................................................................................ 79 7.3.6 read cid/csd registers ................................................................................................................................. 80 7.3.7 reset sequence ................................................................................................................................................ 80 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 5 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 1 at p industrial grade sd /sdhc card overview 1.1 atp p roduct availability figure 1 - 1: product pictures table 1 - 1: capacities * note: support by project, please contact atp for more information. atp p/n capacity af 512sdi - 5acxx 512mb af1gsdi - 5acxx 1gb * af2gsdi - 5adxx 2gb * af4gsdi - 5acxx 4gb * af8gsdi - 5acxx 8gb y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 6 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 1.2 main features ? compatible with sd specification s version 2.00 ? support sd mode, spi mode ? high reliability, operating at - 40 o c to 85 o c ? slc (single - level - cell) nand flash ? water proof, dust proof and esd proof ? sip (system - in - package) process ? resistance to shock and vibration ? enhanced endurance by global wear leveling algorithm ? saticdatarefresh technology to ensure data integrity in rea d operations ? available life monitor tool to check the remaining life of atp sd/sdhc card ? enhanced power cycling support ? support bch ecc up to 40bits/1kbyte ? supports cprm ? form factor: 32 x 24 x 2.1mm ? rohs compliant ? ce & fcc certification ? controlled bom ? cu stomized service: adjustable cid registers, firmware & setting and label by projects 1.3 application atp industrial grade sd / sd hc cards are designed for demanding industrial applications, such as handheld computing, military/aerospace, automotive, marine nav igation, embedded systems , communication equipment or networking, medical equipment, and automation , where mission - critical data requires the highest level of reliability, durability, and data integrity. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 7 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 2 product specifications 2.1 environment specifications type measurement temperature operat ion - 40 o c to 85 o c non - operat ion - 40 o c to 85 o c humidity operation 25 o c , 10% ~ 95% rh, non - condensing non - operation 40 o c , 10% ~ 93% rh, non - condensing bend test non - operati on 10n to the center of the card , 250 cyc les, 30 cycles/minute torque test non - operati on 0.15n - m or +/ - 2.5 , 30 cycles/minute, 1000 cycles salt s pray test (mil - std - 883g method1009.8) non - operati on 35, over 85% rh,5% salt concentration , 24 hours solar r adiation test non - operati on 40 ,irradiat ion 1000w/ m 2 , 24 hours uv light exposure test (iso 7816 - 1) non - operation 254nm, 15ws/cm2 drop test non - operation 150cm/free fall, total 6 drops table 2 - 1: environment y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 8 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 2.2 reliability type measurement number of insertions 1 0,000 minim um endurance technology slc nand flash block endurance: 512mb / 2gb / 4gb / 8gb: 6 0,000 p/e cycles 1gb: 100,000 p/e cycles global wear leveling algorithm tbw (total bytes written) 512mb 6.1 terabytes random write 12.3 terabytes sequential write 1gb 20 terabytes random write 40 terabytes sequential write 2gb 24 terabytes random write 48 terabytes sequential write 4gb 48 terabytes random write 96 terabytes sequential write 8gb 96 terabytes random write 192 terabytes sequential wri te mtbf (@ 25 o c ) > 2 ,000,000 hours table 2 - 2 : reliability note: endurance for flash cards can be predicted based on the usage conditions applied to the device, the internal nand flash cycles, the write amplification factor, and the wear l eveling efficien cy of the flash devices. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 9 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 2.3 data retention 512mb/2gb/4gb/8gb sd card endurance used number of p/e cycles used (block level) corresponding data retention at 25c use condition 10% p/e cycles 6,000 cycles 10 years 100% p/e cycles 60,000 cycle s 1 year 1gb sd card endurance used number of p/e cycles used (block level) corresponding data retention at 25c use condition 10% p/e cycles 10 ,000 cycles 10 years 100% p/e cycles 10 0,000 cycles 1 year table 2 - 3 : data retention note 1: data rete ntion refers to the ability of a memory bit to retain its data state over a period of time after the data is written in nand flash regardless of whether the part is powered on or powered off. a data retention failure is when there is at least 1 bit of data that cannot be read or is read incorrectly. note 2: nand flash suppliers refer to jedec jesd47 & jesd22 for data retention testing. based on the information provided by nand flash suppliers, atp targets data retention as above table for reference. 2.4 perfo rmance model p/n seq . read ( k b/s) seq . write ( k b/s) random read (kb/s) random write (kb/s) af 512 sdi - 5acxx 1 9579 1 4998 17 855 5 078 af1gsdi - 5acxx 18989 17009 17123 5371 af2gsdi - 5adxx 20634 11296 18980 4154 af4gsdi - 5acxx 20469 18720 18196 6081 af8gsdi - 5 acxx 20317 16377 18196 5577 table 2 - 4 : performance note: tested by hdbench 3.40 beta6 with 40mb file size. t he performance may vary depending on the configuration, firmware, setting, application and testing environment . y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 10 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 2.5 electrical characteristics type measurement card supported voltage 2.7~3.6v card supported frequency 0~ 50 mhz data bus width supported 1 or 4 bits table 2 - 5 : electrical characteristics 2.6 extra features type measurement water proof iec 60529 edition 2.1: 2001 - 02 ? ipx7, below 1000mm water, 30min dust proof iec 60529 edition 2.1: 2001 - 02 ? ip6x esd proof iec 61000 - 4 - 2: contact pad +/ - 4kv, non- contact pad (coupling plane discharge) +/ - 8kv, non - contact pad (air discharge) +/ - 15kv rohs compliant yes table 2 - 6 : extra features y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 11 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 2.7 global wear leveling - longer life expectancy the program / erase cycle of each sector/page/block is finite. writing constantly on the same spot will cause the flash to wear out quickly. furthermore, bit errors are not proportioned to p/e cy cles; sudden death may occur when the block is close to its p/e cycle limit. then unrecoverable bit errors will cause fatal data loss (especially for system data or fat). global wear leveling algorithm evenly distributes the p/e cycles of each block to m inimize the possibility of one block exceeding its max p/e cycles before the rest. in return, the life expectancy of memory storage device is prolonged and the chance/occurrence of unrecoverable bit errors could be reduced. 2.8 staticd atarefresh technology ? ensure d ata integrity over time the error bits accumulate to the threshold in the flash memory cell and eventually become uncorrectable despite using the ecc engine. in the traditional handling method, the data is moved to a different location in the fla sh memory; despite the corrupted data is beyond repair ed before the transition. to pre vent data corruption, the sd card monitors the error bit levels in every operation ; when it reaches the preset threshold value, staticdatarefresh is achieved by erasing and re - prog ramming the data into the same block or into another block . after the re - programming operation is completed, the controller reads the data and compares the data/parity to ensure data integrity. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 12 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 2.9 s d life monitoring tool ? lifespan ch eck atp provides sd life monitoring tool , which can automatically identify atp memory cards and check the remaining life of atp microsd / sd cards under w indows 2000/xp/vista/7 . users can thus evaluate atp memory card ? s health status at run time and recei ve a n early warning before its life ends. figure 2 - 9 : sd life monitoring note: the sd card will be busy while sd life monitor ing tool is retrieving the information from the sd card. due to this reason, the user cant' execute this software from the sa me sd card that is being monitored. user friendly life bar remaining life % y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 13 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 2.10 physical dimension ( units in mm) type measurement length 32mm +/ - 0.1mm width 24mm +/ - 0.1mm thickness 2.1mm +/ - 0.15mm weight 2.0 gram max . table 2 - 10 physical dimensio n 2.11 mechanical f orm f actor (units in m m) figure 2 - 1 1 : physical dimensio n y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 14 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 3 electrical characteristics 3.1 dc characteristics figure 3 - 1 : bus signal level parameter symbol min typical max unit remark supply v oltage v dd 2. 7 3.3 3.6 v operating current i cc1 - 50 ma standby current i sb - - 20 0 a input leakage current i li - 10 - 10 a output leakage current i lo - 10 - 10 a input high voltage v ih 0. 625 x v dd - v dd + 0.3 v input low voltage v il vss - 0.3 - 0.2 5 x v dd v output high voltage v oh 0.75x v dd - - v output low voltage v ol - - 0.125 x v dd v table 3 - 1 : dc characteristics y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 15 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 3.2 ac characteristics figure 3 - 2 : timing diagram data input/output referenced to clock ( default ) high speed mode bus timing : parameter symbol min max unit remark clock clk (all values are referred to min (v ih ) and max (v il ) clock frequency data transfer mode f pp 0 50 mhz c card <= 10 pf( 1 card) clock low time t wl 7 - ns c card <= 10 pf( 1 card) clock high time t wh 7 - ns c card <= 10 pf( 1 card) clock rise time t tlh - 3 ns c card <= 10 pf( 1 card) clock fall time t thl - 3 ns c card <= 10 pf( 1 card) inputs cmd, dat (referenced to clk) input set - up time t isu 6 - ns c card <= 10 pf( 1 card) input hold time t ih 2 - ns c card <= 10 pf( 1 card) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 16 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on outputs cmd, dat (referenced to clk) o utput delay time during data transfer mode t odly - 14 ns c l <= 40 pf( 1 card) table 3 - 2 : bus timing - parameters values ( high speed mode ) default bus timing(backward compatible) : parameter symbol min max unit remark clock clk (all values are referred to min (v ih ) and max (v il ) clock frequency data transfer mode f pp 0 25 mhz c card <= 10 pf( 1 card) clock frequency identification mode f od 0 400 khz c card <= 10 pf( 1 card) clock low time t wl 10 - ns c card <= 10 pf( 1 card) clock high time t wh 10 - ns c c ard <= 10 pf( 1 card) clock rise time t tlh - 10 ns c card <= 10 pf( 1 card) clock fall time t thl - 10 ns c card <= 10 pf( 1 card) inputs cmd, dat (referenced to clk) input set - up time t isu 5 - ns c card <= 10 pf( 1 card) input hold time t ih 5 - ns c card <= 1 0 pf( 1 card) outputs cmd, dat (referenced to clk) output delay time during data transfer mode t odly - 14 ns c l <= 40 pf( 1 card) table 3 - 3 : bus timing - parameters values ( default ) (1) 0hz means to stop the clock. the given minimum frequency range is for cases were continues clock is required. comment [leo1]: 100k ?? y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 17 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 3 - 3 : timing diagram data input/output referenced to clock (high - speed) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 18 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on parameter symbol min max unit remark clock clk (all values are referred to min (v ih ) and max (v il ), clock frequency data tra nsfer mode f pp 0 50 mhz clock low time t wl 7 ns clock high time t wh 7 ns clock rise time t tlh 3 ns clock fall time t thl 3 ns inputs cmd, dat (referenced to clk) input set - up time t isu 6 ns input hold time t ih 2 ns outputs cmd, dat (re ferenced to clk) output delay time during data transfer mode t odly 0 14 ns output hold time t o h 2.5 ns total system capacitance for each line c l 40 pf table 3 - 3 : bus timing - parameters values (high - speed) comment [leo2]: ?? 100k ? y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 19 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 4 sd c ard hardware system 4.1 sd card descr iption figure 4 - 1: sd card function block diagram pin # sd interface spi interface name type description name type description 1 cd/ dat3 2 i/o/pp card detect /data line (bit 3) cs i chip select (active low) 2 cmd pp command/ response di i/pp data in 3 vss 1 s supply voltage ground vss s supply voltage ground 4 vdd s supply voltage vdd s supply voltage 5 clk i clock sclk i clock 6 vss 2 s supply voltage ground vss 2 s supply voltage ground 7 dat0 i/o/pp data line (bit 0) do o/pp data out 8 dat1 i/o/pp data line (bit 1) rsv 9 dat2 i/o/pp data line (bit 2) rsv table 4 - 1 : pad assignment y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 20 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 1) s: power supply; i: input; o : output using push- pull drivers; pp: i/o using push - pull drivers; 2) the extended dat lines (dat1 - dat3) are input on power up. they start to operate as dat lines after set_bus_width command. the host shall keep its own dat1 - dat3 lines in input mode, as well, while they are not used. 3) after power up this line is input with 50kohm pull - up (can be used for card detection or spd m ode s election) . the pull - up should be disconnected by user, during regular data transfer, with set_clr_card_detect (acmd42) command each card has a set of information registers . please refer to chapter 5 for the details of registers. name widt h descripti on cid 128 card identification number; card individual number for identification. rca 16 relative card address; local system address of a card, dynamically suggested by the card and approved by the host during initialization. csd 128 card specifi c data; information about the card operation conditions. scr 64 sd configuration register; information about the sd card ?s special features capabilities. ocr 32 operation conditions register . ssr 512 sd status; information about the card propriet ary features. csr 32 card status; information about the card status . table 4 - 2 : sd card registers 4.2 sd b us topology the sd card bus has a single master (application), multiple slaves (cards), synchronous star topology. clock, power and ground signals a re common to all cards. command (cmd) and data (dat0 - dat3) signals are dedicated to each card providing continues point to point connection to all the cards. during initialization process commands are sent to each card individually, allowing the applicat ion to detect the cards and assign logical addresses to the physical slots. data is always sent (received) to (from) each card individually. however, in order to simply the handling of the card stack, after the initialization process, all commands may be s ent concurrently to all cards. addressing information is provided in the command packet. sd bus allows dynamic configuration of the number of data lines. after power up, by default, the sd card will use only dat0 for data transfer. after initialization the host can change the bus width (number of active data lines). this feature allows easy trade off between hw cost and system performance. note that while dat1 - dat3 are not in use, the related host?s dat lines should be in tri - state (input mode) . y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 21 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figu re 4 - 2 : sd card system bus topology 4.3 sd card hardware interfa ce the sd card has six communication lines and three supply lines: ? cmd: command is a bidirectional signal. the host and card drivers are operating in push pull mode. ? dat0 - 3: data lines are bidirectional signals. host and card drivers are operating in push pull mode ? clk: clock is a host to card signal. clk operates in push pull mode ? vdd: vdd is the power supply line for all cards. ? vss1, vss2 are two ground lines. in addition to those lines that are connected to the internal card circuitry there are two contacts of the write protect/card detect switch that are part of the socket. those contacts are not mandatory but if they exist they should be connected as given in the followi ng figure. when dat3 is used for card detection, r dat for dat3 should be unconnected and another resistor should be connected to the ground. r dat and r cmd are pull - up resistors protecting the cmd and the dat lines against bus floating when no card is inse rted or when all card drivers are in a high - impedance mode. the host shall pull - up all dat0 - 3 lines by rdat, even if the host uses sd card as 1 bit mode - only in sd mode. also, the host shall pull - up all "rsv" lines in spi mode, even though they are not us ed. r wp is used for the write protect/card detection switch. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 22 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 4 - 3: bus circuitry diagram 4.4 bus signal line load the total capacitance cl of each line of the sd bus is the sum of the bus master capacitance c host , the bus capacitance cbus itself and the capacitance c card of each card connected to this line: c l = c host + c bus + n*c card n is the number of connected cards. parameter symbol min max. unit remark pull - up resistance for cmd r cm d 10 100 kohm to prevent bus floating pull - up resistance for dat r dat 10 100 kohm to prevent bus floating total bus capacitance for each signal line c l 4 0 pf 1 card chost+cbus shall not exceed 30 pf single card capacitance c card 10 pf maximum signal line inductance 16 nh f pp <= 20 mhz pull - up resist ance inside card (pin1) rdat3 10 90 kohm may be used for card detection table 4 - 3 : bus signal line load y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 23 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 4.5 hot i nsertion and r emoval to guarantee the proper sequence of card pin connection during hot insertion, the use of either a special hot - insertion c apable card connector or an auto - detect loop on the host side (or some similar mechanism) is mandatory. no card shall be damaged by inserting or removing a card into the sd card bus even when the power (vdd) is up. data transfer operations are protected by crc codes, therefore any bit changes induced by card insertion and removal can be detected by the sd card bus master. the inserted card must be properly reset also when clk carries a clock frequency f pp . each card shall have power protection to prevent ca rd (and host) damage. data transfer failures induced by removal/insertion are detected by the bus master. they must be corrected by the application, which may repeat the issued command. 4.6 power up the power up of the sd card bus is handled locally in each sd card and in the bus master. figure 4 - 4 : power - up diagram ? ?power up time? is defined as voltage rising time from 0 volt to vdd min and depends on application parameters such as the maximum number of sd cards, the bus length and the characteristic o f the y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 24 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on power supply unit. ? ?supply ramp up time? provides the time that the power is built up to the operating level (the bus master supply voltage) and the time to wait until the sd ca rd can accept the first command. ? the host shall supply power to the c ard so that the voltage is reached to vdd_min within 250ms and start to supply at least 74 sd clocks to the sd card with keeping cmd line to high. in case of spi mode, cs shall be held to high during 74 clock cycles. ? after power up (including hot inserti on, i.e. inserting a card when the bus is operating) the sd card enters the idle state . in case of sd host, cmd0 is not necessary. in case of spi host, cmd0 shall be the first command to send the card to spi mode. ? cmd8 is newly added in the physical laye r specification version 2.00 to support multiple voltage ranges and used to check whether the card supports supplied voltage. the version 2.00 host shall issue cmd8 and verify voltage before card initialization. the host that does not support cmd8 shall su pply high voltage range. ? acmd41 is a synchronization command used to negotiate the operation voltage range and to poll the cards until they are out of their power - up sequence. in case the host system connects multiple cards, the host shall check that all cards satisfy the supplied voltage. otherwise, the host should select one of the cards and initialize. 4.7 compatibility to multi media card the sd card protocol is designed to be a super - set of the multi media card version 2.11 protocol. for complete detai ls refer to multi media c ard specification. 4.8 card capacity ? standard capacity sd memory cards supports capacity up to and including 2 g bytes (231 bytes). all versions of the physical specifications define the standard capacity sd memory card. ? high cap acity sd memory cards supports capacity more than 2 g bytes (231 bytes) and this version of specification limits capacity up to and including 32 gb. high capacity sd memory card is newly defined from the physical layer specification version 2.00. only host s that are compliant to the physical layer specification version 2.00 or higher and the sd file system specification ver2.00 can access high capacity sd memory cards. other hosts fail to initialize high capacity sd memory cards . y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 25 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 4 - 5 : hosts - cards usability y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 26 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 5 card registers within the card interface seven registers are defined: ocr, cid, csd, rca, scr , ssr and csr . these can be accessed only by corresponding commands. the ocr, cid, csd and scr registers carry the card/content specific information , while the rca register is configuration register storing actual configuration parameters and ssr and csr are two status fields . 5.1 ocr register the 32 - bit operation conditions register stores the vdd voltage profile of the card. in addition, this register includes a status information bit. this status bit is set if the card power up procedure has been finished. ocr bit position vdd voltage window 0 - 6 reserved 7 1.7 - 1.95 8 - 14 2.0 - 2.6 15 2.7 - 2.8 16 2.8 - 2.9 17 2.9 - 3.0 18 3.0 - 3.1 19 3.1 - 3.2 20 3.2 - 3.3 21 3.3 - 3.4 22 3.4 - 3.5 23 3.5 - 3.6 24 - 29 reserved 30 card capacity status 1 31 card power up status bit 2 1) this bit is valid only when the card power up status bit is set. 2) this bit is set to low if the card has not finished the power up routine table 5 - 1 : ocr r egister d efinition the supported voltage range is coded as shown in table 5- 1 . a voltage range is not supported if the corresponding bit value is set to low. as long as the card is busy, the corresponding bit (31) is set to low. 5.2 cid regi ster the card i d entification (cid) register is 128 bits wide. it contains the card identification information used during the card identification phase. every individual flash card shall have a unique identification y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 27 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on number. the structure of the cid registe r is defined in the following paragraphs: name field width cid - slice manufacturer id mid 8 [127:120] oem/application id oid 16 [119:104] product name pnm 40 [103:64] product revision prv 8 [ 63 : 56 ] product serial number psn 32 [ 55 : 24 ] reserved -- 4 [ 23 : 20 ] manufacturing date mdt 12 [ 19 : 8 ] crc7 checksum crc 7 [ 7 : 1 ] not used, always ?1? - 1 [ 0 : 0 ] table 5 - 2 : the cid fields ? mid an 8 bit binary number identifies the card manufacturer. the mid number is controlled, defined and allocated to a sd card manufacturer by the sd group. this procedure is established to ensure uniqueness of the cid register. ? oid a 2 ascii string characters that identifies the card oem and/or the card contents (when used as a distribution media either on rom or flash cards). the oid number is controlled, defined and allocated to a sd card manufacturer by the sd group. this procedure is established to ensure uniqueness of the cid register. ? pnm the product name is a string, 5 ascii characters long. ? prv the product revision is composed of two binary coded decimal (bcd) digits, four bits each, representing an ?n.m? revision number. the ?n? is the most significant nibble and ?m? is the least significant nibble. as an example, the prv binary value field for product revision ?6. 2? will be: 0110 0010 ? psn the serial number is 32 bits of binary number. ? mdt the manufacturing date composed of two hexadecimal digits, one is 8 bit representing the year(y) and the other is four bits representing the month(m). the ?m? field [11:8] is the month code. 1 = january. the ?y? field [19:12] is the year code. 0 = 2000. as an example, the binary value of the date field for comment [leo3]: ?? atp , cid a?5? y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 28 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on production date ?april 2001? will be: 00000001 0100. ? crc crc7 checksum (7 bits). this is the checksum of the cid content s . 5.3 csd register the card - specific data register provides information on how to access the card contents. the csd defines the data format, error correction type, maximum data access time, whether the dsr register can be used etc. the programmable part of t he register (entries marked by w or e, see below) can be hanged by cmd27. the type of the entries in the table below is coded as follows: r = readable, w(1) = writable once, w = multiple writable. name field widt h cell type csd - slice csd structure csd_structure 2 r [127:126] reserved - 6 r [125:120] data read access - time - 1 taac 8 r [119:112] data read access - time - 2 in clk cycles (nsac*100) nsac 8 r [111:104] max. data transfer rate tran_speed 8 r [103:96] card command clas ses ccc 12 r [95:84] max. read data block length read_bl_len 4 r [83:80] partial blocks for read allowed read_bl_partial 1 r [79:79] write block misalignment write_blk_misalign 1 r [78:78] read block misalignment read_blk_misalign 1 r [77:77] dsr implemented dsr_imp 1 r [76:76] reserved - 6 r [75:7 0 ] device size c_size 2 2 r [ 69 : 48 ] reserved - 1 r [47:47] erase single block enable erase_blk_en 1 r [46:46] erase sector size sector_size 7 r [45:39] write protect group size wp_grp_size 7 r [38:32] write protect group enable wp_grp_enable 1 r [31:31] reserved 2 r [30:29] write speed factor r2w_factor 3 r [28:26] max. write data block length write_bl_len 4 r [25:22] partial b locks for write allowed write_bl_partial 1 r [21:21] reserved - 5 r [20:16] y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 29 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on file format group file_format_grp 1 r [15:15] copy flag (otp) copy 1 r/w(1) [14:14] permanent write protection perm_write_protect 1 r/w(1) [13:13] tempor ary write protection tmp_write_protect 1 r/w [12:12] file format file_format 2 r [11:10] reserved - 2 r [9:8] crc crc 7 r/w [7:1] not used, always?1? - 1 - [0:0] table 5 - 3 : the csd register fields the following sections describe the csd fields and the relevant data types. if not explicitly defined otherwise, all bit strings are interpreted as binary coded numbers starting with the left bit first. ? csd_structure version number of the related csd structure csd_structure csd stru cture version valid for sd card physical specification versio n 0 csd version 1.0 version 1.0 - 1.10 version 2.00/standard capacity 1 csd version 2 .0 version 2.00 /high capacity 2 - 3 reserved table 5 - 4 : csd register structure ? taac defines the a synchronous part of the data access time. taac bit position code 2:0 time unit 0=1ns, 1=10ns, 2=100ns, 3=1s, 4=10s, 5=100s, 6=1ms, 7=10ms 6:3 time value 0=reserved, 1=1.0, 2=1.2, 3=1.3, 4=1.5, 5=2.0, 6=2.5, 7=3.0, 8=3.5, 9=4.0, a=4.5, b=5.0, c=5.5, d=6.0, e=7.0, f=8.0 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 30 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 7 reserved table 5 - 5 : taac access time definition ? nsac defines the worst case for the clock dependent factor of the data access time. the unit for nsac is 100 clock cycles. therefore, the maximal value for the clock dependent part of the data access time is 25.5k clock cycles. the total access time nac is the sum of taac and nsac. it has to be computed by the host for the actual clock rate. the read access time should be interpreted as a typical delay for the first data bit of a data block or stream. ? tran_speed the following table defines the maximum da ta transfer rate per one data line - tran_speed: tran_speed bit code 2:0 transfer rate unit 0=100kbit/s, 1=1mbit/s, 2=10mbit/s, 3=100mbit/s, 4... 7=reserved 6:3 time value 0=reserved, 1=1.0, 2=1.2, 3=1.3, 4=1.5, 5=2.0, 6=2.5, 7=3.0, 8=3.5, 9=4.0, a=4.5, b=5.0, c=5.5, d=6.0, e=7.0, f=8.0 7 reserved table 5 - 6 : maximum data transfer rate definition note that for current sd card s that field is always 0_0110_010b (032h) which is equal to 25mhz - the mandatory maximum operating frequency of s d card . in high - speed mode, that field is always 0_1011_010b (05ah) which is equal to 50mhz. and when the timing mode returns to the default by cmd6 or cmd0 command, its value will be 032h. ? ccc the sd card command set is divided into subsets (command cl asses). the card command class register ccc defines which command classes are supported by this card. a value of ?1? in a ccc bit means that the corresponding command class is supported . ccc bit supported card command class 0 class 0 1 class 1 ..... . 11 class 11 table 5 - 7 : supported card command classes y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 31 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on ? read_bl_len the maximum read data block length is computed as 2 read_bl_len . the maximum block length might therefore be in the range 512...2048 bytes. note that in sd card the write_bl_len is a lways equal to read_bl_len read_bl_len block length remark 0 - 8 reserved 9 2 9 = 512 bytes ...... 11 2 11 = 2048 bytes 12 - 15 reserved table 5 - 8 : data block length ? read_bl_partial (always = 1 in sd card ) partial block read is always a llowed in sd card . it means that smaller blocks can be used as well. the minimum block size will be one byte. ? write_blk_misalign defines if the data block to be written by one command can be spread over more than one physical block of the memory device. the size of the memory block is defined in write_bl_len. write_blk_misalign=0 signals that crossing physical block boundaries is invalid. write_blk_misalign=1 signals that crossing physical block boundaries is allowed. ? read_blk_misalign defines if the data block to be read by one command can be spread over more than one physical block of the memory device. the size of the memory block is defined in read_bl_len. read_blk_misalign=0 signals that crossing physical block boundaries is invalid. read_blk_misa lign=1 signals that crossing physical block boundaries is allowed. ? dsr_imp defines if the configurable driver stage is integrated on the card. if set, a driver stage register (dsr) must be implemented also. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 32 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on ? c_size this field is expanded to 22 bits an d can indicate up to 2 tbytes (it is the same as the maximum memory space specified by a 32 - bit block address.) this parameter is used to calculate the user data area capacity in the sd memory card (not include the protected area). the user data area capac ity is calculated from c_size as follows: memory capacity = (c_size+1) * 512k byte as the maximum capacity of the physical layer specification version 2.00 is 32 gb, the upper 6 bits of his field shall be set to 0. ? erase_blk_en this field is fixed to 1 , which means the host can erase one or multiple units of 512 bytes. ? sector_size this field is fixed to 7fh, which indicates 64 kbytes. this value does not relate to erase operation. ve rsion 2.00 cards indicates memory boundary by au size and this fie ld should not be used. ? wp_grp_size this field is fixed to 00h. the high capacity sd memory card does not support write protected groups. ? wp_grp_enable this field is fixed to 00h. the high capacity sd memory card does not support write protected group s. ? r2w_factor this field is fixed to 2h, which indicates 4 multiples. write timeout can be calculated by multiplying the read access time and r2w_factor. however, the host should not use this factor and should use 250 ms for write timeout. ? write_bl_l en this field is fixed to 9h, which indicates write_bl_len=512 byte. ? write_bl_partial this field is fixed to 0, which indicates partial block read is inhibited and only unit of block access is allowed. ? file_format_grp this field is set to 0. host sho uld not use this field. . y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 33 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on ? copy defines if the contents is original (= ?0?) or has been copied (=?1?). the copy bit for otp and mtp devices, sold to end consumers, is set to ?1? which identifies the card contents as a copy. the copy bit is an one time pro grammable bit. ? perm_write_protect permanently protects the whole card content against overwriting or erasing (all write and erase commands for this card are permanently disabled). the default value is ?0?, i.e. not permanently write protected. ? tmp_w rite_protect temporarily protects the whole card content from being overwritten or erased (all write and erase commands for this card are temporarily disabled). this bit can be set and reset. the default value is ?0?, i.e. not write protected. ? file_form at this field is set to 0. ? crc the crc field carries the check sum for the csd contents. the checksum has to be recalculated by the host for any csd modification. the default corresponds to the initial csd contents. 5.4 rca register the writable 16 - bit relative card address register carries the card address that is published by the card during the card identification. this address is used for the addressed host - card communication after the card identification procedure. the default value of the rca regis ter is 0x0000. the value 0x0000 is reserved to set all cards into the stand - by state with cmd7. 5.5 scr register in addition to the csd register there is another configuration register that named - sd card configuration register (scr). scr provides informatio n on sd card 's special features that were configured into the given card. the size of scr register is 64 bit. this register is set in the factory by atp . the following table describes the scr register content. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 34 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on description field widt h cell typ scr slic e scr structure scr_structure 4 r [63:60] sd card - spec. version sd_spec 4 r [59:56] data_status_after erases data_stat_after_erase 1 r [55:55] sd security support sd_security 3 r [54:52] dat bus widths supported sd_bus_widths 4 r [51:48] reserved - 16 r [47:32] reserved for manufacturer usage - 32 r [31:0] table 5 - 1 6 : the scr fields ? scr_structure version number of the related scr structure in the sd card physical layer specification. scr_structure scr struct ure version valid for sd physica l layer specification versio n 0 scr version no. 1.0 version 1.0 1 - 2 . 0 0 1 - 15 reserved table 5 - 9 : scr register structure version ? sd_spec describes the sd card physical layer specification version supported by this card. sd_spec physical layer speci fication version number 0 version 1.0 - 1.01 1 version 1.10 2 version 2 . 0 0 3 - 15 reserved table 5 - 1 0 : sd card physical layer specification version ? data_stat_after_erase defines the data status after erase, whether it is ?0? or ?1?. ? sd_security y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 35 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on describes the security algorithm supported by the card. sd_security supported algorithm 0 no security 1 not used 2 version 1.01 3 version 2 . 0 4 - 7 reserved table 5 - 1 1 : sd supported security algorithm ? sd_bus_widths describes all the dat bus widths that are supported by this card. sd_bus_widths supported bus widths bit 0 1 bit (dat0) bit 1 reserved bit 2 4 bit (dat0 - 3) bit 3 [msb] reserved table 5 - 12: sd card supported bus widths 5.6 ssr register sd status; information about the card proprietary features (see 6.5 ) 5.7 cs r register card status; information about the card status (see 6.5). y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 36 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 6 sd card f unctional d escription 6.1 sd bus protocol communication over the sd bus is based on command and data bit streams which are initiated by a start bit and terminated by a stop bit. ? command : a command is a token which starts an operation. a command is sent from the host either to a single card (addressed command) or to all connected cards (broadcas t command). a command is transferred serially on the cmd line. ? respo nse : a response is a token which is sent from an addressed card, or (synchronously) from all connected cards, to the host as an answer to a previously received command. a response is tra nsferred serially on the cmd line. ? data : data can be transferred from the card to the host or vice versa. data is transferred via the data lines. figure 6 - 1 : ?no response? and ?no data? operations card addressing is implemented using a session addres s, assigned to the card during the initialization phase. the basic transaction on the sd bus is the command/response transaction. this type of bus transactions transfers their information directly within the command or response structure. in addition, some operations have a data token. data transfers to/from the sd card are done in blocks. data blocks always were succeeded by crc bits. single and multiple block operations are defined. note that the multiple block operation mode is better for faster write o peration. a multiple block transmission is terminated when a stop command follows on the cmd line. data transfer can be configured by the host to use single or multiple data lines. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 37 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 6 - 2 : (multiple) block read operation the block write operation uses a simple busy signaling of the write operation duration on the dat0 data line regardless of the number of data lines used for transferring the data figure 6 - 3 : (multiple) block write operation command tokens have the following coding scheme: figure 6 - 4 : command token format y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 38 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 6 - 5 : response token format in the cmd line the msb bit is transmitted first the lsb bit is the last. when the wide bus option is used, the data is transferred 4 bits at a time. start and end bits, as well as th e crc bits, are transmitted for every one of the dat lines. crc bits are calculated and checked for every dat line individually. the crc status response and busy indication will be sent by the card to the host on dat0 only (dat1 - dat3 during that period are don?t care). there are two types of data packet format for the sd card. (1) usual data (8 bit width ) the usual data (8 bit width) are sent in lsb (least significant byte) first, msb (most significant byte) last manner. but in the individual byte it is msb (most significant bit) first, lsb (least significant bit) last. figure 6 - 6 : data packet format - usual data y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 39 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on (2) wide width data (sd memory register) the wide width data is shifted from msb bit. figure 6 - 7 : data packet format - wide width data 6.2 c omma nd 6.2.1 command types and format all communication between host and cards is controlled by the host (master). the host sends commands of two types: broadcast and addressed (point - to - point) commands. ? broadcast commands broadcast commands are intended for all cards. some of these commands require a response. ? addressed (point - to - point) commands the addressed commands are sent to the addressed card and cause a response from this card. ? command format all commands have a fixed code length of 48 bits, needing a transmission time of 2.4 s @ 20 mhz y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 40 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on bit position 47 46 [45:40] [39:8] [7:1] 0 width (bits) 1 1 6 32 7 1 value ?0? ?1? x x x ?1? description start bit transmission bit command index argument crc7 end bit table 6 - 1 : comman d format a command always starts with a start bit (always ?0?), followed by the bit indicating the direction of transmission (host = ?1?). the next 6 bits indicate the index of the command, this value being interpreted as a binary coded number (between 0 and 63). some commands need an argument (e.g. an address), which is coded by 32 bits. a value denoted by ?x? in the table above indicates this variable is dependent on the command. all commands are protected by a crc. every command codeword is terminated b y the end bit (always ?1?). all commands and their arguments are listed in table 6- 3- table 6- 11. 6.2.2 command classes the command set of the sd card system is divided into several classes (see table 6- 2). each class supports a set of card functionalities. cla ss 0, 2, 4, 5 and 8 are mandatory supported by atp sd card s. the other classes are optional. the supported card command classes (ccc) are coded as a parameter in the card specific data (csd) register of each card, providing the host with information on ho w to access the card. card command class 0 1 2 3 4 5 6 7 8 9 10 11 s upported commands class description basic reserved block read reserv ed b lock write erase write protection lock card application speci fic i/o mode switch reserved cmd0 mandatory + cmd2 mandatory + cmd3 mandatory + cmd4 mandatory + cmd5 optional + cmd6 mandatory + cmd7 mandatory + cmd 8 mandatory + comment [leo4]: atp ? ? y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 41 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on cmd9 mandatory + cmd10 mandatory + cmd12 mandatory + cmd13 mandatory + cmd15 mandatory + cmd16 mandatory + + + cmd17 mandatory + cmd18 mandatory + cmd24 mandatory + cmd25 mandatory + cmd27 mandatory + cmd28 optional + cmd29 optional + cmd30 optional + cmd32 mandatory + cmd33 mandatory + cmd34 - 37 optional + cmd38 mandato ry + cmd42 optional + cmd50 optional + cmd52 optional + cmd53 optional + cmd55 mandatory + cmd56 mandatory + cmd57 optional + acmd6 mandatory + acmd13 mandatory + acmd22 mandatory + acmd23 mandatory + acmd41 mandatory + acmd42 mandatory + acmd51 mandatory + table 6 - 2 : card command classes (cccs) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 42 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 6.2.3 ? detailed command description the following tables define in detail all sd card bus commands. cmd index type argument resp abbreviation command description cmd0 bc [31:0] stuff bits - go_idle_state resets all cards to idle state cmd1 reserved cmd2 bcr [31:0] stuff bits r2 all_send_cid asks any card to send the cid numbers on the cmd line (any card that is connected to the host will respond) cmd3 bcr [31:0] stuff bits r6 send_relative_ addr ask the card to publish a new relative address (rca) cmd5 reserved for i/o cards (refer to "sdio card specification") cmd7 ac [31:16] rca [15:0] stuff bits r1b (only from the selecte d card) select/deselect_ card command toggles a card between the stand - by and transfer states or between the programming and disconnect states. in both cases the card is selected by its own relative address and gets deselected by any other address; addre ss 0 deselects all. in case that the rca equal 0 then the host may do one of the following: - use other rca number to perform card deselection. - re - send cmd3 to change its rca number to other than 0 and then use cmd7with rca=0 for card de - selection. cmd 8 bcr [ 31:12]reserve d bits [11:8]supply voltage(vhs) [7:0]check pattern r7 send_if_cond sends sd memory card interface condition, which includes host supply voltage information and asks the card whether card supports voltage. reserved bits shall be set to '0'. cmd9 ac [31:16] rca [15:0] stuff bits r2 send_csd addressed card sends its card - specific data (csd) on the cmd line. cmd10 ac [31:16] rca [15:0] stuff bits r2 send_cid addressed card sends its card identification (cid) on cmd the line. cmd11 reserved cmd12 ac [31:0] stuff bits r1b stop_ transmission forces the card to stop transmission cmd13 ac [31:16] rca [15:0] stuff bits r1 send_status addressed card sends its status register. cmd14 reserved cmd15 ac [31:16] r ca [15:0] stuff bits - go_inactive_ state sets the card to inactive state in order to pro tect the card stack against com munication breakdowns. table 6 - 3 : basic commands (class 0) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 43 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on cmd index type argument resp abbreviation command description cmd 16 ac [31:0] block length r1 set_blocklen in the case of a standard capacity sd memory card, this command sets the block length (in bytes) for all following block commands (read, write, lock). default block length is fixed to 512 bytes. set length is valid for memory access commands only if partial block read operation are allowed in csd. in the case of a high capacity sd memory card, block length set by cmd16 command does not affect the memory read and write commands. always 512 bytes fixed block leng th is used. this command is effective for lock_unlock command. in both cases, if block length is set larger than 512bytes, the card sets the block_len_error bit. cmd17 adtc [31:0] data address r1 read_single_ block in the case of a standard capacity s d memory card, this command, this command reads a block of the size selected by the set_blocklen command 1 . in the case of a high capacity card, block length is fixed 512 bytes regardless of the set_blocklen command. cmd18 adtc [31:0] data address r1 r ead_multiple_block continuously transfers data blocks from card to host until interrupted by a stop_transmission command. cmd19 reserved ... cmd23 1) the data transferred must not cross a physical block boundary unless read_blk_misalign is set in the csd. table 6 - 2 : block oriented read commands (class 2) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 44 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on cmd index type argument resp abbreviation command description cmd16 ac [31:0] block length r1 set_blocklen in the case of a standard capacity sd memory card, this command sets t he block length (in bytes) for all following block commands (read, write, lock). default block length is fixed to 512 bytes. set length is valid for memory access commands only if partial block read operation are allowed in csd. in the case of a high capac ity sd memory card, block length set by cmd16 command does not affect the memory read and write commands. always 512 bytes fixed block length is used. this command is effective for lock_unlock command. in both cases, if block length is set larger than 512b ytes, the card sets the block_len_error bit. cmd24 adtc [31:0] data address r1 write_block in the case of a standard capacity sd memory card, this command writes a block of the size selected by the set_blocklen command 1 . in the case of a high capaci ty card, block length is fixed 512 bytes regardless of the set_blocklen command. cmd25 adtc [31:0] data address r1 write_multiple_block continuously writes blocks of data until a stop_transmission follows. cmd26 reserved for manufacturer cmd27 adtc [31:0] stuff bits r1 program_csd programming of the programmable bits of the csd. 1) the data transferred must not cross a physical block boundary unless write_blk_misalign is set in the csd. in case that write partial blocks is not supported then the block length=default block length (given in csd). table 6 - 4 : block oriented write commands (class 4) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 45 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on cmd index type argument resp abbreviation command description cmd28 ac [31:0] data address r1b set_write_prot if the card has write pro tection fea - tures, this command sets the write protection bit of the addressed group. the properties of write protection are coded in the card specific data (wp_grp_size). cmd29 ac [31:0] data address r1b clr_write_prot if the card provides write pr otection features, this command clears the write protection bit of the addressed group. cmd30 adtc [31:0] write protect data address r1 send_write_prot if the card provides write protection features, this command asks the card to send the status of t he write protection bits. 1 cmd31 reserved 1)32 write protection bits (representing 32 write protect groups starting at the specified address) followed by 16 crc bits are transferred in a payload format via the data line. the last (least significant) bit of the protection bits corresponds to the first addressed group. if the addresses of the last groups are outside the valid range, then the corresponding write protection bits shall be set to zero table 6 - 5 : block o riented write protection commands (c lass 6) cmd index type argument resp abbreviation command description cmd32 ac [31:0] data address r1 erase_wr_blk_start sets the address of the first write - block to be erased. cmd33 ac [31:0] data address r1 erase_wr_blk_end sets the address of the last write block of the continuous range to be erased. cmd38 ac [31:0] stuff bits r1b erase erases all previously selected write blocks. cmd39 reserved cmd40 non valid in sd card - reserved for multimediacard i/o mode cmd4 1 reserved table 6 - 6 : erase commands (class 5) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 46 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on cmd index type argument resp abbreviation command description cmd16 ac [31:0] block length r1 set_blocklen in the case of a standard capacity sd memory card, this command sets the block length ( in bytes) for all following block commands (read, write, lock). default block length is fixed to 512 bytes. set length is valid for memory access commands only if partial block read operation are allowed in csd. in the case of a high capacity sd memory car d, block length set by cmd16 command does not affect the memory read and write commands. always 512 bytes fixed block length is used. this command is effective for lock_unlock command. in both cases, if block length is set larger than 512bytes, the card se ts the block_len_error bit. cmd42 adtc [31:0] stuff bits. r1 lock_unlock used to set/reset the password or lock/unlock the card. the size of the data block is set by the set_block_len command. cmd43 - 49 reserved cmd51 reserved table 6 - 7 : lock card (class 7) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 47 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on cmd index type argument resp abbreviation command description cmd55 ac [31:16] rca [15:0] stuff bits r1 app_cmd indicates to the card that the next command is an application specific command rather than a standard command cmd56 adtc [31:1] stuff bits. [0]: rd/wr1 r1 gen_cmd used either to transfer a data block to the card or to get a data block from the card for general purpose/application specific commands. in the case of a standard capacity sd memory cards, the si ze of the data block shall be set by the set_block_len command. in the case of a high capacity sd memory cards, the size of the data block is fixed to 512 byte. the host sets rd/wr=1 for reading data from the card and sets to 0 for writing data to the card . cmd58 - 59 reserved cmd60 - 63 reserved for manufacturer 1) rd/wr: ?1? the host gets a block of data from the card. ?0? the host sends block of data to the card. all the application specific commands (given in table 21) are supported if class 8 is al lowed (mandatory in sd card ). table 6 - 8 : application specific commands (class 8) cmd index type argument resp abbreviation command description cmd52. cmd54 reserved for i/o mode (refer to "sdio card specification") table 6 - 9 : i/o mode command s (class 9) the following table describes all the application specific commands supported/reserved by the sd card . all the following acmds shall be preceded with app_cmd command (cmd55). cmd index type argument resp abbreviation command description y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 48 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on acmd6 ac [31:2] stuff bits [1:0]bus width r1 set_bus_width defines the data bus width (?00?=1bit or ?10?=4 bits bus) to be used for data transfer. the allowed data bus widths are given in scr register. acmd13 adtc [31:0] stuff bits r1 sd_status send the sd card status. acmd17 reserved acmd18 -- -- -- -- reserved for sd security applications1 acmd19 to acmd21 reserved acmd22 adtc [31:0] stuff bits r1 send_num_wr_blocks send the number of the written (without errors) write blocks. responds with 32bit+crc data block. if write_bl_partial='0', the unit of acmd22 is always 512byte.if write_bl_partial='1', the unit of acmd22 is a block length which was used when the write command was executed. acmd23 ac [31:23] stuff bits [22:0]numbe r of blocks r1 set_wr_blk_erase_count set the number of write blocks to be pre - erased before writing (to be used for faster multiple block wr command). ?1?=default (one wr block)(2). acmd24 reserved acmd25 -- -- -- -- reserved for sd security appl ications1 acmd26 -- -- -- -- reserved for sd security applications1 acmd38 -- -- -- -- reserved for sd security applications1 acmd39 to acmd40 reserved acmd41 bcr [ 31]reserved bit [30]hcs(ocr[30]) [29:24]reserved bits [23:0] vdd voltage window( ocr[23:0]) r3 sd_send_op_cond asks the accessed card to send its operating condition register (ocr) content in the response on the cmd line. acmd42 ac [31:1] stuff bits [0]set_cd r1 set_clr_card_detect connect[1]/disconnect[0] the 50kohm pull - up r esistor on cd/dat3 (pin 1) of the card. acmd43 -- -- -- -- reserved for sd security applications1 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 49 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on acmd49 acmd51 adtc [31:0] stuff bits r1 send_scr reads the sd configuration register (scr). (1) refer to ?sd memory card security specifi cation? for detailed explanation about the sd security features (2) command stop_tran (cmd12) shall be used to stop the transmission in write multiple block whether the pre - erase (acmd23) feature is used or not. table 6 - 10 : application specific commands u sed/reserved by sd card cmd index type argument resp abbreviation command description cmd6 adtc [31] mode 0:check function 1:switch function [30:24] reserved (all ?0?) [23:20] reserved for function group 6 (all ?0? or 0xf) [19:16] reserved f or function group 5 (all ?0? or 0xf) [15:12] reserved for function group 4 (all ?0? or 0xf) [11:8] reserved for function group 3 (all ?0? or 0xf) [7:4] function group 2 for command system [3:0] function group 1 for access mode r1 switch_ func checks switchable function (mode 0) and switch card function (mode 1). cmd34 reserved for each command system set by switch function command (cmd6). cmd3 5 cmd3 6 cmd3 7 cmd 50 cmd 57 table 6 - 11 : switch function commands (class 10) 6.3 card state transitio n table table 6- 12 defines the card state transitions in dependency of the received command. current state idle ready iden stby tran data rcv prg dis ina trigger of state change changes to class independent ?operation complete? - - - - - - - tran stby - class 0 cmd0 idle idle idle idle idle idle idle idle idle - cmd2 - ident - - - - - - - - cmd3 - - stby stby - - - - - - y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 50 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on cmd4 - - - stby - - - - - - cmd7, card is addressed - - - tran - - - - prg - cmd7, card is not addressed - - - stby stby stby - dis - - cmd 8 idle - - - - - - - - - cmd9 - - - stby - - - - - - cmd10 - - - stby - - - - - - cmd12 - - - - - tran prg - - - cmd13 - - - stby tran data rcv prg dis - cmd15 - - - ina ina ina ina ina ina - class 2 cmd16 - - - - tran - - - - - cmd17 - - - - data - - - - - cmd18 - - - - data - - - - - class 4 cmd16 see class 2 cmd24 - - - - rcv - - - - - cmd25 - - - - rcv - - - - - cmd27 - - - - rcv - - - - - class 6 cmd28 - - - - prg - - - - - cmd29 - - - - prg - - - - - cmd30 - - - - data - - - - - class 5 cmd32 - - - - tran - - - - - cmd33 - - - - tran - - - - - cmd38 - - - - prg - - - - - class 7 cmd42 - - - - rcv - - - - - class 8 cm d55 idle - - stby tran data rcv prg dis - cmd56; rd/wr = 0 - - - - rcv - - - - - cmd56; rd/wr = 1 - - - - data - - - - - acmd6 - - - - tran - - - - - acmd13 - - - - data - - - - - y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 51 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on current state idle ready ident stby tran dat rcv prg dis ina acmd22 - - - - data - - - - - acmd23 - - - - tran - - - - - acmd18,25,26,38, 43,44,45,46,47,48,49 refer to ?sd card security specification? for explanation about the sd security features acmd41, card vdd range compatible read y - - - - - - - - - acmd41, card is busy idle - - - - - - - - - acmd41, card vdd range not compatible ina - - - - - - - - - acmd42 - - - - tran - - - - - acmd51 - - - - data - - - - - class 9 cmd52 - cmd54 refer to "sdio card specification" class 10 cmd6 - - - - data - - - - - cmd34 - 37,50,57 - - - - tran - - - - - class 11 cmd41; cmd43...cmd49, cmd58 - cmd59 reserved cmd60...cmd63 reserved for manufacturer table 6 - 12 : card state transition table y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 52 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on responses al l responses are sent via the command line cmd. the response transmission always starts with the left bit of the bit string corresponding to the response codeword. the code length depends on the response type. a response always starts with a start bit (alw ays ?0?), followed by the bit indicating the direction of transmission (card = ?0?). a value denoted by ?x? in the tables below indicates a variable entry. all responses except for the type r3 (see below) are protected by a crc. every command codeword is t erminated by the end bit (always ?1?). there are f ive types of responses for sd card . their formats are defined as follows: ? r1 (normal response command): code length 48 bit. the bits 45:40 indicate the index of the command to be responded to, this value being interpreted as a binary coded number (between 0 and 63). the status of the card is coded in 32 bits. note that in case that data transfer to the card is involved then a busy signal may appear on the data line after the transmission of each block of d ata. the host shell check for busy after data block transmission . bit position 47 46 [45:40] [39:8] [7:1] width (bits) 1 1 6 32 7 value ?0? ?0? x x x description start bit transmission bit command index card status crc7 table 6 - 13 : response r1 ? r1b is identical to r1 with an optional busy signal transmitted on the data line. the card may become busy after receiving these commands based on its state prior to the command reception. the host shell check for busy at the response. r efer to chapter 4.12.3 for detailed description and timing diagrams. ? r2 (cid, csd register): code length 136 bits. the contents of the cid register are sent as a response to the commands cmd2 and cmd10. the contents of the csd register are sent as a resp onse to cmd9. only the bits [127...1] of the cid and csd are transferred, the reserved bit [0] of these registers is replaced by the end bit of the response. bit position 135 134 [133:128] [127:1] 0 width (bits) 1 1 6 127 1 value ?0? ?0? ?111111? x ?1? description start bit transmission bit reserved cid or csd register incl. internal crc7 end bit table 6 - 14 : response r2 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 53 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on ? r3 (ocr register): code length 48 bits. the contents of the ocr register is sent as a response to acmd41. bi t position 47 46 [45:40] [39:8] [7:1] 0 width (bits) 1 1 6 32 7 1 value ?0? ?0? ?111111? x ?1111111? ?1? description start bit transmission bit reserved ocr register reserved end bit table 6 - 15 : response r3 ? r6 (published rca response): code length 48 bit. the bits 45:40 indicate the index of the bit position 47 46 [45:40] [39:8] argument field [7:1] 0 width (bits) 1 1 6 16 16 7 1 value ?0? ?0? x x x x ?1? description start bit transmission bit c ommand index (?000011?) new published rca [31:16] of the card [15:0] card status bits: 23,22,19,12:0 (see table 30) crc 7 end bit table 6 - 16 : response r6 command to be responded to - in that case it will be ?000011? (together with bit 5 in the status bits it means = cmd3). the 16 msb bits of the argument field are used for the published rca number. ? r 7 (card interface condition) : code length is 48 bits. the card support voltage information is sent by the response of cmd8. bits 19 - 16 indicate t he voltage range that the card supports. the card that accepted the supplied voltage returns r7 response. in the response, the card echoes back both the voltage range and check pattern set in the argument. bit position 47 46 [45:40] [39:20] [19:16] [15:8] [7:1] 0 width (bits) 1 1 6 20 4 8 7 1 value ?0? ?0? ?001000? ?00000h? x x x ?1? y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 54 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on description start bit transmission bit command index reserved bits voltage accepted echo - back of check pattern crc 7 end bit table 6 - 17 : response r 7 table 6 - 18 shows the format of 'voltage accepted' in r7. voltage accepted value definition 0000b not defined 0001b 2.7 - 3.6v 0010b reserved for low voltage range 0100b reserved 1000b reserved others not defined table 6 - 18: voltage accepted in r7 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 55 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 6.4 sd card status s d card supports two card status field as follows: - ? card status ?: compatible to the multimediacard protocol. - ?sd_status ?: extended status field of 512bits that supports special features of the sd c ard and future application specific features. 6.4.1 card status the response format r1 contains a 32 - bit field named card status . this field is intended to transmit the card?s status information (which may be stored in a local status register) to the host. if not specified otherwise, the status entries are always related to the previous issued command. the semantics of this register is according to the csd entry spec_vers, indicating the version of the response formats (possibly used for later extensions). tab le 6- 19 defines the different entries of the status. the type and clear condition fields in the table are abbreviated as follows: ? type: e: error bit. s: status bit. r: detected and set for the actual command response. x: detected and set during command execution. the host must poll the card by issuing the status command in order to read these bits. ? clear condition: a: according to the card current state. b: always related to the previous command. reception of a valid command will clear it (with a de lay of one command). c: clear by read. 56 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on bit s identifier type value description clear condi - ti on 31 out_of_range e r x ?0?= no error ?1?= error the command?s argument was out of the allowed range for this card. c 30 address_error e r x ?0?= no error ?1?= error a misaligned address which did not match the block length was used in the command. c 29 block_len_error e r x ?0?= no error ?1?= error the transferred block length is not allowed for this card, or the number of transferred by tes does not match the block length. c 28 erase_seq_error e r ?0?= no error ?1?= error an error in the sequence of erase commands occurred. c 27 erase_param e r x ?0?= no error ?1?= error an invalid selection of write - blocks for erase occur red. c 26 wp_violation e r x ?0?= not protected ?1?= protected attempt to program a write protected block. c 25 card_is_locked s x ?0? = card unlocked ?1? = card locked when set, signals that the card is locked by the host a bits identi fier type value description clear condi - tion 24 lock_unlock_ failed e r x ?0? = no error ?1? = error set when a sequence or password error has been detected in lock/unlock card command. c 23 com_crc_error e r ?0?= no error ?1?= error the crc check of the previous command failed. b 22 illegal_command e r ?0?= no error ?1?= error command not legal for the card state b 21 card_ecc_failed e r x ?0?= success ?1?= failure card internal ecc was applied but failed to correct the data. c 20 cc _error e r x ?0?= no error ?1?= error internal card controller error c 19 error e r x ?0?= no error ?1?= error a general or an unknown error occurred during the operation. c y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 57 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 17, 18 reserved 16 csd_overwrite e r x ?0?= no error ?1?= erro r can be either one of the following errors: - the read only section of the csd does not match the card content. - an attempt to reverse the copy (set as original) or permanent wp (unprotected) bits was made. c 15 wp_erase_skip s x ?0?= not protected ?1?= protected only partial address space was erased due to existing write pro tected blocks. c 14 card_ecc_disabled s x ?0?= enabled 1?= disabled the command has been executed without using the internal ecc. a 13 erase_reset s r ?0?= cleared ?1?= set an erase sequence was cleared before executing because an out of erase sequence command was received c 12:9 current_state s x 0 = idle 1 = ready 2 = ident 3 = stby 4 = tran 5 = data; 6 = rcv ; 7 = prg 8 = dis 9 - 14 = reserved 15 = reserved t he state of the card when receiving the command. if the command execution causes a state change, it will be visible to the host in the response to the next command. the four bits are interpreted as a binary coded number between 0 and 15. b 8 ready_for_da ta s x ?0?= not ready ?1?= ready corresponds to buffer empty signaling on the bus a 7,6 reserved 5 app_cmd s r ?0? = disabled ?1? = enabled the card will expect acmd, or indication that the command has been interpreted as acmd c 4 reserved 3 ake _seq_error e r ?0? = no error ?1? = error error in the sequence of authenti cation process 2,1, 0 reserved table 6 - 1 9 : card status y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 58 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on the following table defines for each command responded by a r1 response the affected bits in the status field. an ?x? me ans the error/status bit may be set in the response to the respective command. cmd# response format 1 status bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 :9 8 5 3 x x x x 6 x x x x x x x x x x 7 x x x x x x x x x x x x x x x x x 12 x x x x x x x x x x x x x 13 x x x x x x x x x x x x x x x x x x 16 x x x x x x x x x x x x x x x x x 17 x x x x x x x x x x x x x x x x x x 18 x x x x x x x x x x x x x x x x x x 24 x x x x x x x x x x x x x x x x x x x x 25 x x x x x x x x x x x x x x x x x x x x 26 x x x x x x x x x x x x x x x x 27 x x x x x x x x x x x x x x x x 28 x x x x x x x x x x x x x x x x x 29 x x x x x x x x x x x x x x x x x 30 x x x x x x x x x x x x x x x x x 32 x x x x x x x x x x x x x x x x x x 33 x x x x x x x x x x x x x x x x x x 38 x x x x x x x x x x x x x x x x x 42 x x x x x x x x x x x x x x x x 55 x x x x x x x x x x x x x x x x x 56 x x x x x x x x x x x x x x x x x x acmd 6 x x x x x x x x x x x x x x x x x x acmd 13 x x x x x x x x x x x x x x x x x acmd 22 x x x x x x x x x x x x x x x x x acmd 23 x x x x x x x x x x x x x x x x x acmd 42 x x x x x x x x x x x x x x x x x acmd 51 x x x x x x x x x x x x x x x x x table 6 - 18 : card status field / command - cross reference y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 59 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 6.4.2 sd status the sd status contains status bits that are related to the sd card proprietary features and may be used for future application specific usage. the size of the sd status is one data block of 512bit. the content of this register is transmitted to the host over the dat bus along with 16 bit crc. the sd status is sent to the host over the dat bus if acmd13 is sent (cmd55 followed with cmd13). acmd13 can be sent to a card only i n ? tran_state? (card is selected). sd status structure is described in bellow. the same abbreviation for ?type? and ?clear condition? were used as for the card status above. bits identifier type value description clear condi - ti on 511: 510 dat_bus_ width s r ?00?= 1 (default) ?01?= reserved ?10?= 4 bit width ?11?= reserved shows the currently defined data bus width that was defined by set_bus_width command a 509 secured_mode s r ?0?= not in the mode ?1?= in secured mode card is in secur ed mode of operation a 508: 496 reserved 495: 480 sd_card_type sr 00xxh?= sd memory cards as defined in physical spec ver1.01 - 2.00 (?x?=don?t care). the following cards are currently defined: 0000?= regular sd rd/wr card. 0001?= sd rom card in the future, the 8 lsbs will be used to define different variations of an sd memory card (each bit will define different sd types). the 8 msbs will be used to define sd cards that do not comply with current a 479: 448 size_of_protec ted_area sr in u nits of mult*block_len refer to csd register the actual area = (size_of_protected_area) * mult * block_len. a 447: 440 speed_class sr speed class of the card (see below) (see below) a 439: 432 performance_m ove sr performance of move indicat ed by 1 [mb/s] step. (see below) (see below) a 431: 428 au_size sr size of au (see below) (see below) a 427: reserved 424 423: 408 erase_size sr number of aus to be erased at a time (see below) a 407: 402 erase_timeout sr timeout value for erasing areas specified by unit_of_erase_au (see below) a 401: 400 erase_offset sr fixed offset value added to erase time. (see below) a 399:312 reserved 311:0 reserved table 6 - 19 : sd card status y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 60 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on ? size_of_protected_area se tting this field differs between standard and high capacity cards. in the case of a standard capacity card, the capacity of protected area is calculated as follows: protected area = size_of_protected_area_* mult * block_len. size_of_protected_area is speci fied by the unit in mult*block_len. in the case of a high capacity card, the capacity of protected area is specified in this field: protected area = size_of_protected_area size_of_protected_area is specified by the unit in byte. ? speed_class this 8 - bit field indicates the speed class and the value can be calculated by pw/2. speed_class value definition 00h class 0 01h class 2 02h class 4 03h class 6 04h ? ffh reserved table 6 - 20 : speed class code field ? performance_move this 8 - bit field indicates pm and the value can be set by 1 [mb/sec] step. if the card does not move used rus, pm should be considered as infinity. setting to ffh means infinity. the minimum value of pm is defined by in table 6- 21. performance_move value defin ition 00h not defined 01h 1 [mb/sec] 02h 2 [mb/sec] ....... ...... feh 254 [mb/sec] ffh infinity table 6 - 21 : performance move field y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 61 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on ? au_size this 4 - bit field indicates au size and the value can be selected in power of 2 from 16 kb. au_size value definition 0h not defined 1h 16 kb 2h 32 kb 3h 64 kb 4h 128 kb 5h 256 kb 6h 512 kb 7h 1 mb 8h 2 mb 9h 4 mb ah ? fh reserved table 6 - 2 2 : au_size field the maximum au size, depends on the card capacity, i s defined in table 6- 23. the card can set any au size between ru size and maximum au size. capacity 16 mb ? 64 mb 128 mb - 256 mb 512 mb 1 gb ? 32 gb maximum au size 512 kb 1 mb 2 mb 4 mb table 6 - 2 3 : maximum au size ? erase_size this 16 - bit f ield indicates nerase. when nerase numbers of aus are erased, the timeout value is specified by erase_timeout (refer to erase_timeout). the host should determine proper number of aus to be erased in one operation so that the host can indicate progress of e rase operation. if this field is set to 0, the erase timeout calculation is not supported. erase_size value definition 0000h erase time - out calculation is not supported. 0001h 1 au 0002 2 au 0003 3 au ....... ....... ffffh 65535 au table 6 - 2 4 : erase size field y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 62 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on ? erase_timeout this 6 - bit field indicates the terase and the value indicates erase timeout from offset when multiple aus are erased as specified by erase_size. the range of erase_timeout can be defined as up to 63 seconds and the card manufacturer can choose any combination of erase_size and erase_timeout depending on the implementation. once erase_timeout is determined, it determines the erase_size. the host can determine timeout for any number of au erase by the equation (6) . refer to 4.14 for the concept of calculating erase timeout. if erase_size field is set to 0, this field shall be set to 0. erase_timeout value definition 00 erase time - out calculation is not supported. 01 1 [sec] 02 2 [sec] 03 3 [sec] .. ..... ....... 63 63 [sec] table 6 - 2 4: erase timeout field ? erase_offset this 2 - bit field indicates the toffset and one of four values can be selected. the erase offset adjusts the line by moving in parallel on the upper side. refer to figure 4- 33 and equation (6) in 4.14. this field is meaningless if erase_size and erase_timeout fields are set to 0. erase_offset value definition 0h 0 [sec] 1h 1 [sec] 2h 2 [sec] 3h 3 [sec] table 6 - 25 : erase offset field y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 63 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 6.5 card identificati on mode and data transfer mode two operation modes are defined for the sd card system: ? card identification mode the host will be in card identification mode after reset and while it is looking for new cards on the bus. cards will be in this mode after re set until the send_rca command (cmd3) is received. ? data transfer mode cards will enter data transfer mode once their rca is first published. the host will enter data transfer mode after identifying all the cards on the bus. the following table shows the dependencies between operation modes and card states. each state in the sd card state diagram (see figure 6- 8 ) is associated with one operation mode: card state operation mode inactive state inactive idle state card identification mode ready sta te identification state stand - by state data transfer mode transfer state sending - data state receive - data state programming state disconnect state table 6 - 2 6 : overview of card states vs. operation modes while in card identification mode the host resets all the cards that are in card identification mode, validates operation voltage range, identifies cards and asks them to publish relative card address (rca). this operation is done to each card separately on its own cmd line. all data communication in the card identification mode uses the command line (cmd) only. 6.5.1 card identification mode while in card identification mode the host resets all the cards that are in card identification mode, validates operation voltage range, identifies ca rds and asks them to publish relative card address (rca). this operation is done to each card separately on its own cmd line. all data communication in the card identification mode uses the command line (cmd) only. during the card identification process, t he card shall operate in the sd clock frequency of the identification clock rate fod . y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 64 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on the command go_idle_state (cmd0) is the software reset command and sets each card into idle state regardless of the current card state. cards in inactive state are not affected by this command. after power - on by the host, all cards are in idle state, including the cards that have been in inactive state before. after power - on or cmd0, all cards? cmd lines are in input mode, waiting for start bit of the next command. the c ards are initialized with a default relative card address (rca=0x0000) and with a default driver stage register setting (lowest speed, highest driving current capability). at the start of communication between the host and the card, the host may not know the card supported voltage and the card may not know whether it supports the current supplied voltage. the host issues a reset command (cmd0) with a specified voltage while assuming it may be supported by the card. to verify the voltage, a following new co mmand (cmd8) is defined in the physical layer specification version 2.00. send_if_cond (cmd8) is used to verify sd memory card interface operating c ondition. the card checks the validity of operating condition by analyzing the argument of cmd8 and the host checks the validity by analyzing the response of cmd8. the supplied voltage is indicated by vhs filed in the argument. the card assumes the voltage specified in vhs as the current supplied voltage. only 1 - bit of vhs shall be set to 1 at any given time. bo th crc and check pattern are used for the host to check validity of communication between the host and the card. if the card can operate on the supplied voltage, the response echoes back the supply voltage and the check pattern that were set in the command argument. if the card cannot operate on the supplied voltage, it returns no response and stays in idle state. it is mandatory to issue cmd8 prior to first acmd41 for initialization of high capacity sd memory card (see figure 6- 27) . receipt of cmd8 makes t he cards realize that the host supports the physical layer version 2.00 and the card can enable new functions. it is also mandatory for low - voltage host to send cmd8 before acmd41. in case that a dual voltage card is not receiving cmd8 the card will work a s a high - voltage only card, and in this case that a low voltage host didn't send cmd8 the card will go to inactive at acmd41. sd_send_op_cond (acmd41) is designed to provide sd m emory card hosts with a mechanism to identify and reject cards which do not ma tch the vdd range desired by the host. this is accomplished by the host sending the required vdd voltage window as the operand o f this command . cards which cannot perform data transfer in the specified range shall discard themselves from further bus operat ions and go into inactive state. the levels in the ocr register shall be defined accordingly. note that acmd41 is application specific command, therefore app_cmd (cmd55) shall always precede acmd41. the rca to be used for cmd55 in idle_state shall be the c ard?s default rca = 0x0000. after the host issues a reset command (cmd0) to reset the card, the host shall issue cmd8 prior to acmd41 to re - initialize the sd memory card. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 65 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 6 - 2 7 : sd card state diagram (card identification mode) by setting the ocr to zero in the argument of acmd41, the host can query each card and determine the common voltage range before sending out - of - range cards into the inactive state (query mode). this query should be used if the host is able to select a common voltage range o r if a notification to the application of non usable cards in the stack is desired. the card does not start initialization if acmd41 is issued as a query. afterwards, the host may choose a voltage for operation and reissue acmd41 with this condition, sendi ng incompatible cards into the inactive state. during the initialization procedure, the host is not allowed to change the operating voltage range. after the bus is activated the host starts card initialization and identification process (see figure 6- 28). the initialization process starts with sd_send_op_cond (acmd41) by setting its operational conditions and the hcs bit in the ocr. the hcs (host capacity support) bit set to 1 indicates that the host supports high capacity sd memory card. the hcs (host cap acity support) bit set to 0 indicates that the host does not support high capacity sd memory card. receiving of cmd8 expands the acmd41 function; hcs in the argument and ccs (card capacity y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 66 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on status) in the response. hcs is ignored by cards, which didn?t resp ond to cmd8. however the host should set hcs to 0 if the card returns no response to cmd8. standard capacity sd memory card ignores hcs. if hcs is set to 0, high capacity sd memory card never return ready statue (keep busy bit to 0). the busy bit in the oc r is used by the card to inform the host that initialization of acmd41 is completed. setting the busy bit to 0 indicates that the card is still initializing. setting the busy bit to 1 indicates completion of initialization. the host repeatedly issues acmd4 1 until the busy bit is set to 1. the card checks the operational conditions and the hcs bit in the ocr only at the first acmd41. while repeating acmd41, the host shall not issue another command except cmd0. if the card responds to cmd8, the response of ac md41 includes the ccs field information. ccs is valid when the card returns ready (the busy bit is set to 1). ccs=1 means that the card is a high capacity sd memory card. ccs=0 means that the card is a standard capacity sd memory card. the host performs th e same initialization sequence to all of the new cards in the system. incompatible cards are sent into inactive state. the host then issues the command all_send_cid (cmd2), to each card to get its unique card identification (cid) number. card that is unide ntified (i.e. which is in ready state) sends its cid number as the response (on the cmd line). after the cid was sent by the card it goes into identification state. thereafter, the host issues cmd3 (send_relative_addr) asks the card to publish a new relati ve card address (rca), which is shorter than cid and which is used to address the card in the future data transfer mode. once the rca is received the card state changes to the stand - by state. at this point, if the host wants to assign another rca number, i t can ask the card to publish a new number by sending another cmd3 command to the card. the last published rca is the actual rca number of the card. the host repeats the identification process, i.e. the cycles with cmd2 and cmd3 for each card in the system . y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 67 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 6 - 28: card initialization and identification flow (sd mode) 6.5.2 data transfer mode until the end of card identification mode the host must remain at f od frequency because some cards may have operating frequency restrictions during the card identi fication mode. in data transfer mode the host may operate the card in f pp frequency range. the host issues send_csd (cmd9) to obtain the card specific data (csd register), e.g. block length, card storage capacity, etc. cmd7 is used to select one card and put it into the transfer state . when cmd7 is issued with the reserved relative card address ?0x0000?, all cards are put back to stand - by state (note that it is the responsibility of the host to reserve the rca=0 for card de - selection ). y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 68 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 6 - 2 9: sd c ard state diagram (data transfer mode) y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 69 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 6.6 error handling to correct defects in the memory field inside card the card include error correction codes in the payload data (ecc). this correction is intended to correct static errors. additionally two met hods of detecting errors generated during the data transfer (dynamic errors) via a cyclic redundancy check (crc) are implemented 6.6.1 e rror c orrection c ode (ecc) the atp sd card is free of static errors. all errors are covered inside the card, even errors occ urring during the lifetime of the card are covered for the user. the only effect which may be notified by the end user is, that the overall memory capacity may be reduced by small number of blocks. all flash handling is done on card, so that no external er ror correction is needed. 6.6.2 cyclic redundancy c heck (crc) the crc is intended for protecting sd card commands, responses and data transfer against transmission errors on the sd card bus. one crc is generated for every command and checked for every respons e on the cmd line. for data blocks one crc per transferred block is generated. the crc is generated and checked as described in the following. ? crc7 the crc7 check is used for all commands, for all responses except type r3, and for the csd and cid regist ers. the crc7 is a 7 - bit value and is computed as follows: generator polynomial: g(x) = x 7 + x 3 + 1. m(x) = (first bit) * x n + (second bit) * x n - 1 +...+ (last bit) * x 0 crc[6...0] = remainder [(m(x) * x 7 ) / g(x)] the first bit is the most left bit of the c orresponding bitstring (of the command, response, cid or csd). the degree n of the polynomial is the number of crc protected bits decreased by one. the number of bits to be protected is 40 for commands and responses (n = 39), and 120 for the csd and cid (n = 119). ? crc16 i n case of one dat line usage (as in multimediacard) than the crc16 is used for payload protection in block transfer mode. the crc check sum is a 16 - bit value and is computed as follows: generator polynomial g(x) = x 16 +x 12 +x 5 +1 y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 70 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on m(x) = (first bit) * x n + (second bit)* x n - 1 +...+ (last bit) * x 0 crc[15...0] = remainder [(m(x) * x 16 ) / g(x)] the first bit is the first data bit of the corresponding block. the degree n of the polynomial denotes the number of bits of the data block decreased by one (e.g. n = 4095 for a block length of 512 bytes). the generator polynomial g(x) is a standard ccitt polynomial. the code has a minimal distance d=4 and is used for a payload length of up to 2048 bytes (n <= 16383). the same crc16 method is used in si ngle dat line mode and in wide bus mode. in wide bus mode, the crc16 is done on each line separately . 6.6.3 crc and illegal command all commands are protected by crc (cyclic redundancy check) bits. if the addressed card?s crc check fails, the card does not res pond and the command is not executed. the card does not change its state, and com_crc_error bit is set in the status register. similarly, if an illegal command has been received, the card will not change its state, will not response and will set the illega l_command error bit in the status register. only the non - errodata neous state branches are shown in the state diagrams contains a complete state transition description. there are different kinds of illegal commands: ? commands which belong to classes not s upported by the card (e.g. write commands in read only cards). ? commands not allowed in the current state (e.g. cmd2 in transfer state). ? commands which are not defined (e.g. cmd5). 6.6.4 read, write and erase time - out the times after which a time - out condit ion for read operations occurs are (card independent) either 100 times longer than the typical access times for these operations given below or 100ms (the lower of them) . the times after which a time - out condition for write/erase operations occurs are (car d independent) either 100 times longer than the typical program times for these operations given below or 250ms (the lower of them). a card shall complete the command within this time period, or give up and return an error message. if the host does not get any response with the given time out it should assume the card is not going to respond anymore and try to recover (e.g. reset the card, power cycle, reject, etc.). the typical access and program times are defined as follows: ? read the read access time i s defined as the sum of the two times given by the csd parameters taac and nsac . these card parameters define the typical delay between the end bit of the read command and y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 71 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on the start bit of the data block. this number is card dependent and should be used b y the host to calculate throughput and the maximal frequency for stream read. ? write the r2w_factor field in the csd is used to calculate the typical block program time obtained by multiplying the read access time by this factor. it applies to all write/e rase commands (e.g. set(clr)_write_protect, program_csd and the block write commands). ? erase the duration of an erase command will be (order of magnitude) the number of write blocks (write_bl) to be erased multiplied by the block write delay. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 72 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on 7 spi mode 7.1 introduction the spi mode consists of a secondary communication protocol which is offered by sd card s. this mode is a subset of the sd card protocol, designed to communicate with a spi channel, the interface is selected duri ng the first reset command after power up (cmd0) and cannot be changed once the part is powered on. 7.2 spi b us topology the atp sd card spi interface is compatible with spi hosts available on the market. as any other spi device the atp sd card spi channel consists of the following four signals: cs: host to card chip select signal. clk: host to card clock signal datain: host to card data signal. dataout: card to host data signal. another spi common characteristic are byte transfers, which is implemente d in the card as well. all data tokens are multiples of bytes (8 bit) and always byte aligned to the cs signal. the card identification and addressing methods are replaced by a hardware chip select (cs) signal. there are no broadcast commands. for every co mmand, a card (slave) is selected by asserting (active low) the cs signal (see figure 7- 1). the cs signal must be continuously active for the duration of the spi transaction (command, response and data). the only exception occurs during card programming, w hen the host can deassert the cs signal without affecting the programming process. the spi interface uses the 7 out of the sd 9 signals (dat1 and dat 2 are not used, dat3 is the cs signal) of the sd bus. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 73 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 7 - 1 : sd card system (spi mode) bus topolog y 7.3 spi bus protocol while the sd memory card channel is based on command and data bit streams that are initiated by a start bit and terminated by a stop bit, the spi channel is byte oriented. every command or data block is built of 8 - bit bytes and is byt e aligned to the cs signal (i.e. the length is a multiple of 8 clock cycles). the card starts to count spi bus clock cycle at the assertion of the cs signal. every command or data token shall be aligned to 8 - clock cycle boundary. similar to the sd memory c ard protocol, the spi messages consist of command, response and datablock tokens. all communication between host and c ards is controlled by the host (master). the host starts every bus transaction by asserting the cs signal low. the selected card always re sponds to the command as opposed to the sd mode. when the card encounters a data retrieval problem in a read operation, it will respond with an error response (which replaces the expected data block) rather than by a timeout as in the sd mode. additionally , every data block sent to the card during write operations will be responded with a data response token. in the case of a standard capacity memory card, a data block can be as big as one card write block and as small as a single byte. partial block read/w rite operations are enabled by card options specified in the csd register. in the case of a high capacity sd memory card, the size of data block is fixed to 512 bytes. the block length set by cmd16 is only used for cmd42 and not used for memory data transf er. so, partial block read/write operations are also disabled. furthermore, write protected commands y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 74 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on (cmd28, cmd29 and cmd30) are not supported. figure 7 - 2 : spi mode initialization flow 7.3.1 mode selection and initialization the sd card is powered up in t he sd mode. it will enter spi mode if the cs signal is asserted (negative) during the reception of the reset command (cmd0). if the card recognizes that the sd mode is required it will not respond to the command and remain in the sd mode. if spi mode is re quired, the card will switch to spi and respond with the spi mode r1 response. the only way to return to the sd mode is by entering the power cycle. in spi mode, the sd card protocol state machine in sd mode is not observed. all the sd card commands suppor ted in spi mode are always available. figure 7 - 3 shows the initialization sequence of spi mode. send_if_cond (cmd8) is used to verify sd memory card interface operating condition. the argument format of cmd8 is the same as defined in sd mode and the respon se format of cmd8 is defined in section 7.3.2.6. the card checks the validity of operating condition by analyzing the argument of cmd8 and the host checks the validity by analyzing the response of cmd8. the supplied voltage is indicated by vhs filed in the argument. the card assumes the voltage specified in vhs as the current supplied voltage. only 1- bit of vhs shall be y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 75 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on set to 1 at any given time. check pattern is used for the host to check validity of communication between the host and the card. if the car d indicates an illegal command, the card is legacy and does not support cmd8. if the card supports cmd8 and can operate on the supplied voltage, the response echoes back the supply voltage and the check pattern that were set in the command argument. if vca in the response is set to 0, the card cannot operate on the supplied voltage. if check pattern is not matched, cmd8 communication is not valid. in this case, it is recommended to retry cmd8 sequence. figure 7 - 3 : spi mode initialization flow read_ocr (c md58) is designed to provide sd memory card hosts with a mechanism to identify cards that do not match the vdd range desired by the host. if the host does not accept voltage range, it shall not proceed further initialization sequence. the levels in the ocr register shall be defined accordingly . sd_send_op_cond (acmd41) is used to start initialization and to check if the card has completed initialization. it is mandatory to issue cmd8 prior to the first acmd41. receiving of cmd8 expands the cmd58 and acmd41 function; hcs (high capacity support) in the argument of acmd41 and ccs (card capacity status) in the response of cmd58. hcs is ignored by the card, which didn?t accept cmd8. standard capacity sd memory card ignores hcs. the ?in idle state? bit y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 76 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on in the r1 r esponse of acmd41 is used by the card to inform the host if initialization of acmd41 is completed. setting this bit to ?1? indicates that the card is still initializing. setting this bit to ?0? indicates completion of initialization. the host repeatedly is sues acmd41 until this bit is set to ?0?. the card checks the hcs bit in the ocr only at the first acmd41. while repeating acmd41, the host shall not issue another command except cmd0. after initialization is completed, the host should get ccs information in the response of cmd58. ccs is valid when the card accepted cmd8 and after the completion of initialization. ccs=1 means that the card is a high capacity sd memory card. ccs=0 means that the card is a standard capacity sd . 7.3.2 bus transfer protection every sd card token transferred on the bus is protected by crc bits. in spi mode, the sd card offers a non protected mode which enables systems built with reliable data links to exclude the hardware or firmware required for implementing the crc generation and ve rification functions. in the non - protected mode the crc bits of the command, response and data tokens are still required in the tokens. however, they are defined as ?don?t care? for the transmitter and ignored by the receiver. the spi interface is initiali zed in the non - protected mode. however, the reset command (cmd0) which is used to switch the card to spi mode, is received by the card while in sd mode and, therefore, must have a valid crc field. since cmd0 has no arguments, the content of all the fields , including the crc field, are constants and need not be calculated in run time. a valid reset command is: 0x40, 0x0, 0x0, 0x0, 0x0, 0x95 the host can turn the crc option on and off using the crc_on_off command (cmd59). 7.3.3 data read the spi mode supports single block read and multiple block read operations (cmd17 or cmd18 in the sd card protocol). upon reception of a valid read command the card will respond with a response token followed by a data token of the length defined in a previous set_blocklen (cmd 16) command (refer to figure 7- 3). figure 7 - 3 : single block read operation y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 77 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on in case of a data retrieval error, the card will not transmit any data. instead, a special data error token will be sent to the host. figure 7- 4 shows a data read operation which terminated with an error token rather than a data block. figure 7 - 4 : read operation - data error in case of multiple block read operation every transferred block has its suffixed of 16 bit crc. stop transmission command (cmd12) will actually stop the da ta transfer operation (the same as in sd card operation mode). figure 7 - 5 : multiple block read operation 7.3.4 data write in spi mode the sd card supports single block and multiple block write commands. upon reception of a valid write command (cmd24 or cmd25 in the sd card protocol), the card will respond with a response token and will wait for a data block to be sent from the host. crc suffix, block length and start address restrictions are (with the exception of the csd parameter write_bl_partial controllin g the partial block write option) identical to the read operation. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 78 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on figure 7 - 6 : single block write operation every data block has a prefix of ?start block? token (one byte). after a data block has been received, the card will respond with a data - respon se token. if the data block has been received without errors, it will be programmed. as long as the card is busy programming, a continuous stream of busy tokens will be sent to the host (effectively holding the dataout line low). in multiple block write o peration the stop transmission will be done by sending ?stop tran? token instead of ?start block? token at the beginning of the next block. in case of write error indication (on the data response) the host shall use send_num_wr_blocks (acmd22) in order to get the number of well written write blocks. figure 7 - 7 : multiple block write operation while the card is busy, resetting the cs signal will not terminate the programming process. the card will release the dataout line (tri - state) and continue with progr amming. if the card is reselected before the programming is finished, the dataout line will be forced back to low and all commands will be rejected. resetting a card (using cmd0) will terminate any pending or active programming operation. this may destroy the data formats on the card. it is in the responsibility of the host to prevent it. 7.3.5 erase & write protect management the erase and write protect management procedures in the spi mode are identical to those of the sd mode. while the card is erasing or ch anging the write protection bits of the predefined sector list, it will y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 79 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on be in a busy state and hold the dataout line low. figure 7- 8 illustrates a ?no data? bus transaction with and without busy signaling. figure 7 - 8 : ?no data? operations 7.3.6 read cid/csd r egisters unlike the sd card protocol (where the register contents is sent as a command response), reading the contents of the csd and cid registers in spi mode is a simple read - block transaction. the card will respond with a standard response token followe d by a data block of 16 bytes suffixed with a 16 bit crc. the data time out for the csd command cannot be set to the cards taac since this value is stored in the card?s csd. therefore the standard response time - out value (ncr) is used for read latency of t he csd register. 7.3.7 reset sequence the sd card requires a defined reset sequence. after power on reset or cmd0 (software reset) the card enters an idle state. at this state the only valid host commands are acmd41 (sd_send_op_cond), cmd58 (read_ocr) and cmd59 (crc_on_off). cmd1 (send_op_cond) is also valid - that means that in spi mode cmd1 and acmd41 have the same behavior. after power on, once the card accepted valid acmd41, it will be able to accept also cmd1 ev en if used after re - initializing (cmd0) the card. the host must poll the card (by repeatedly sending cmd1 or acmd41) until the ?in - idle - state? bit in the card response indicates (by being set to 0) that the card completed its initialization processes and is ready for the next command. in spi mode, as opposed to sd mode, acmd41 (or cmd1 as well) has no operands and does not return the contents of the ocr register. instead, the host may use cmd58 (available in spi mode only) to read the ocr register. furthe rmore, it is in the responsibility of the host to refrain from accessing cards that do not support its voltage range. the usage of cmd58 is not restricted to the initializing phase only, but can be issued at any time. y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 80 atp confidential & proprietary
revision 3.7 atp industrial grade sd card specificati on y y o o u u r r u u l l t t i i m m a a t t e e m m e e m m o o r r y y s s o o l l u u t t i i o o n n ! ! 81 atp confidential & proprietary


▲Up To Search▲   

 
Price & Availability of AF2GSDI-5ADXX

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X